$(function () {
    echart_4();
});


function echart_4() {
    var myChart = echarts.init(document.getElementById('chart_4'));
    var option = {
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['用电量（单位千瓦）'],
            textStyle: {
                color: '#fff'
            },
            top: '8%'
        },
        grid: {
            top: '20%',
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        color: ['#FF4949', '#FFA74D', '#FFEA51', '#4BF0FF'],
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: ['7', '8', '9', '10', '11', '12', '13','14', '15', '16'],
            splitLine: {
                show: false
            },
            axisLine: {
                lineStyle: {
                    color: '#FFFFFF'
                }
            }
        },
        yAxis: {
            name: '',
            type: 'value',
            splitLine: {
                show: false
            },
            axisLabel: {
                show: true,
                textStyle: {
                    color: '#FFFFFF',
                    fontSize: '10'
                }
            },
            axisLine: {
                lineStyle: {
                    color: '#fff'
                }
            }
        },
        series: [{
            name: '用电量',
            type: 'line',
            data: [0.39, 0.42, 0.15, 0.86, 0.56,0.14,0.62,0.96,0.14,0.62,],
            label:{
                show:true,
                color:'#fff',
            }
        },
        ]
    };

    myChart.setOption(option);
}

